/*
 * NetRayt
 * Copyright (c) 2007-2008 Maciej Nabozny.
 *
 * NetRayt is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 3 of the License, or
 * (at your option) any later version.
 *
 * NetRayt is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with NetRayt; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
*/

#ifndef _ADD_SERVER
#define _ADD_SERVER


#include <QtGui>
#include "ui_addServer.h"
#include "conn_class/conn.h"

using namespace Ui;

class server {
	public:
		QString host;
		int port;
		
		int mem, cpuc, cpuf;
		bool yafray, indigo, blender;
};

class addServer: public QDialog {
	Q_OBJECT
	private:
		Dialog ui;		// interfejs
		
		QTcpSocket *conn;	// polaczenie z serwerem
		connThread *connT;	// obsluga polaczenia
		
	public:
		server sInfo;		// informacje o serwerze
		
		addServer(QWidget *parent = 0, Qt::WFlags f = 0);
		~addServer();
	public slots:
		void readAddress();				// wyślij żądanie do serwera (getinfo)
		void getResponse(argList r, QString filename);	// odbierz informacje o serwerze (odpowiedź na getinfo)
};

#endif

